<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
		        xmlns:ice="http://www.icesoft.com/icefaces/component"   
                template="layout/template.xhtml">
                       
<ui:define name="body">

    <h1>@beanName@ results</h1>
    <p>Generated query page</p>
    
    <ice:form id="queryFormId">
        <ice:outputText value="No results from search" 
                    id="queryOutputTextId"
            rendered="#{empty @componentName@.resultList}"/>
    <f:subview id="queryResultsId" rendered="#{not empty @componentName@.resultList}">
        <ice:dataTable id="@componentName@Table"
                     var="item"
		columnClasses="allCols"
                   value="#{@componentName@.resultList}">
            <ice:column id="column@componentName@list">
                <f:facet name="header">Result</f:facet>
                #{item}
            </ice:column>
        </ice:dataTable>

       <div class="tableControl">
            <s:link view="/@pageName@.xhtml"
                    rendered="#{@componentName@.previousExists}"
                    value="&lt;&lt; First Page"
                    id="firstPageLinkId">
                <f:param name="firstResult" value="0"/>
            </s:link>

            <s:link view="/@pageName@.xhtml"
                    rendered="#{@componentName@.previousExists}"
                    value="&lt; Previous Page"
                    id="previousPageLinkId">
                <f:param name="firstResult"
                         value="#{@componentName@.previousFirstResult}"/>
            </s:link>

            <s:link view="/@pageName@.xhtml"
                    rendered="#{@componentName@.nextExists}"
                    value="Next Page &gt;"
                    id="nextPageLinkId">
                <f:param name="firstResult"
                         value="#{@componentName@.nextFirstResult}"/>
            </s:link>

            <s:link view="/@pageName@.xhtml"
                    rendered="#{@componentName@.nextExists}"
                    value="Last Page &gt;&gt;"
                    id="lastPageLinkId">
                <f:param name="firstResult"
                         value="#{@componentName@.lastFirstResult}"/>
            </s:link>
       </div>

    </f:subview>
  </ice:form>
</ui:define>

</ui:composition>

